<%@page import="ContentManagers.RoleManagers.AuthenticationManager"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>

<!DOCTYPE html>
<% //employ temporary session management here
        try{
          
                if(session.getAttribute("username") != null && (session.getAttribute("username").equals("xxxxdefaultxxxx") == false))
                {   //System.out.print(session.getAttribute("username").toString());
                    new AuthenticationManager().redirectToProperIndex(0, request, response); 
                    
                }
                
                else{
        %>

            <html>
                <head>
                    <link rel="stylesheet" type="text/css" href="User Interface/css/user_int.css" />
                </head>
                <body>

                <%@ include file="index_header.jsp"%>
                <% //Call default header file. The header contains the links for other pages. %>


                <div id ="body_wrapper">
                    <% //Actual Content of the Index page starts here. %>

                        <%@ include file="default_left_sidebar.jsp" %>
                        <%@ include file="index_contents.jsp" %>

                    <% //Actual Content of the Index page ends here. %>
                </div>


                <%@ include file="index_footer.jsp" %>
                <% //Call default footer file %>
                </body>
            </html>

<%  }
        }catch(Exception e)
            {   session = request.getSession();
                session.setAttribute("username", "xxxxdefaultxxxx");
                session.setAttribute("sessionID", "xxxxdefaultxxxx");

                response.sendRedirect("index.jsp");

            } %>